home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / satellit / pacdoc / eltlog.asc < prev    next >
Text File  |  1991-04-12  |  6KB  |  123 lines

  1. The files "eltlog" and "eltlogxx" which appear on PACSAT, UoSAT-OSCAR-14 
  2. and LUSAT are logs of memory errors caused by cosmic radiation. The source 
  3. code accompaning this documentation is for a program which decodes and 
  4. displays the contents of an eltlog. The .exe file elogdisp.exe has been 
  5. compiled for MS-DOS computers.
  6.  
  7. The following extract from the UoSAT/Microsat file system documentation 
  8. describes the process by which SEUs are discovered and logged in the 
  9. "eltlog" files. 
  10.  
  11. Programmers:
  12.  
  13. An eltlog file is simply a collection of the MEMERR structures
  14. described below. Multi-byte values are stored INTEL style, least
  15. significant byte first. "int" is 2 bytes, "long" is 4, "char" is 1.
  16.  
  17. If you write an elog display program for a non-IBM computer, please pass 
  18. it along by uploading it to one of the PACSATs.
  19.  
  20. JWW
  21.  
  22. P.S. The structure described here has been in use on AO-16 and LO-19
  23. since March, and on UO-14 since 4th April. Older eltlog files use a
  24. slightly different format described in earlier documentation. For the
  25. statistically minded, the UO-14 eltlogs beginning with 10 April will
  26. accurately reflect the SEU rate in  4 X 1024 X 1020 X 8 bits of static
  27. RAM. Accurate statistics from AO-16 and LO-19 will be available after
  28. those satellites are reloaded.
  29.  
  30. ---------------------------
  31.  
  32. 5.5 SEU Correction and Monitoring
  33.  
  34. Cosmic radiation passing through semiconductor RAMs can cause stored bits to 
  35. change. The RAMDISK is protected against such single-event upsets (SEUs) by an 
  36. error-detection and correction (EDAC) code implemented in software. SEUs will 
  37. be corrected whenever data is read from the disk. If data were left on the 
  38. disk for several days without being read, SEUs might accumulate and defeat the 
  39. error correction capabilities of the EDAC code. To prevent this, all data in 
  40. the file system must be regularly read to detect and correct SEUs. This is 
  41. called a "disk wash", and it is implemented as part of the file system server 
  42. task. The entire disk - FAT, directory, files and free space - is washed 
  43. regularly.
  44.  
  45. The disk wash rate is controlled by the global variable called g_washperiod, 
  46. which is the number of seconds after which one cluster will be washed. The 
  47. default is 4 seconds. Every g_washperiod seconds, one cluster is selected and 
  48. read; if any error is detected, the cluster is corrected and re-written, and 
  49. an error log request is sent on the error logging stream.
  50.  
  51. 5.5.1 SEU Logging
  52.  
  53. When errors are detected, a MEMERR structure describing the error is sent on 
  54. the stream '_seus' to the station 'seulog'. The 'seulog' station must be 
  55. provided by a task other than the file system server. The function do_elt() in 
  56. the module elt.c is an error logging server which provides the 'seulog' sta-
  57. tion and processes log requests. This function should be called by the host 
  58. task whenever the host task is posted. do_elt() appends the MEMERR structures 
  59. to a file called 'eltlog'. 'eltlog' has PFH file type 0x0b. There are 4 global 
  60. variables which control the operation of do_elt():
  61.  
  62. gdoelt          if 0 stop logging errors;
  63. gmaxelterr      maximum number of errors to put in a log file;
  64. gcurelterr      curent number of errors in the log file;
  65. gtotelterr      total number of errors logged since startup.
  66.  
  67. The file 'eltlog' can be downloaded or deleted at any time. If the file is 
  68. deleted, a new one is created when the next MEMERR structure arrives. The 
  69. <gcurelterr> variable is reset to 0 when a new elt log file is opened.
  70.  
  71. The current definition of the MEMERR structure is :
  72.  
  73. struct MEMERR {
  74.      long time;                 /* time of correction       */
  75.      unsigned int cluster;      /* cluster of error         */
  76.      int sector;                /* sector w/in cluster      */
  77.      int byte;                  /* byte w/in sector         */
  78.      unsigned long fnumber;     /* File in which error was  */
  79.      int severity;
  80.      char pattern;              /* pattern for type 1       */
  81.      int function;              /* reason for check         */
  82. };
  83.  
  84. There are NO slack bytes in the structure. 
  85.  
  86. Much like a DOS disk, the RAMDISK is composed of small sectors which are 
  87. grouped into larger clusters; a cluster is the smallest unit of disk space 
  88. which can be allocated to a file. MEMERR.sector tells which 255-byte sector 
  89. the SEU was in; MEMERR.cluster tells what 1020-byte cluster the sector was 
  90. part of; and MEMERR.byte tells which byte in the sector contained the SEU. 
  91.  
  92. The software EDAC code used to protect the RAMDISK can correct any error which 
  93. is confined to one byte. Even if the byte is completely destroyed, it will be 
  94. restored to its original condition. These correctable errors will have severi-
  95. ty code 1 in the MEMERR.severity variable. Errors which span more than one 
  96. byte, but are still detected by the EDAC code will be given severity 2. Such 
  97. errors are NOT corrected.
  98.  
  99. If the error was correctable, the MEMERR.pattern byte shows which bits were 
  100. effected by the SEU. Generally, only one '1' bit will appear in MEMERR.pat-
  101. tern. MEMERR.pattern has no meaning if MEMERR.severity is not equal to 1.
  102.  
  103. The MEMERR.function indicates whether the error was detected during an SEU 
  104. wash or during a user-initiated data read. The value 1 for washes, and 2 for 
  105. user reads. 
  106.  
  107. MEMERR.fnumber indicates which file contained the error. This is only valid if 
  108. the error was detected during file washing, in which case MEMERR.function will 
  109. be 1. If MEMERR.function is 1, then MEMERR.fnumber tells what file or part of 
  110. the disk contained the SEU. If MEMERR.function is not equal to 1, the error 
  111. was detected during a normal disk read, and MEMERR.fnumber has no meaning.
  112.  
  113. function        fnumber         meaning
  114. --------        ----------      ----------------------------------------
  115. 1              0xfffffffe      error detected in unallocated cluster
  116. 1              0xffffffff      error detected in FAT by wash
  117. 1              0x00000000      error detected in directory by wash
  118. 1              n              error detected in file <n> by wash
  119. 2              x              error detected during read, file unknown
  120.  
  121. MEMERR.time tells when the error was corrected; as usual, it indicates the 
  122. number of seconds after 00:00:00 UTC January 1, 1970.
  123.